package org.linjie.cocacola.yiluchunyue2019.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.emallos.xiama.support.domain.BaseModel;

import lombok.Getter;
import lombok.Setter;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
import java.math.BigDecimal;

/**
 * 
 *
 * @author cnlinjie@foxmail.com
 */
@Table(name = "donation_record")
@Entity
@Getter
@NoArgsConstructor
public class DonationRecordModel  extends BaseModel<DonationRecordModel> {

    
    
    //  捐款目标 0 公益，1队伍，2个人
    private  Integer targetSourceType;
    
    
    //  目标ID
    private  Long targetId;
    
    
    //  目标名称
    private  String targetName;
    
    
    //  目标头像
    private  String targetHeadImg;
    
    
    //  捐款来源用户ID
    private  Long fromSourceUserId;
    
    
    //  用户ID
    private  Long userId;
    
    
    //  真实姓名
    private  String userRealname;
    
    
    //  用户昵称
    private  String userWxNickname;
    
    
    //  用户头像
    private  String userWxHeadImg;
    
    
    //  留言昵称
    private  String realname;
    
    
    //  留言
    private  String leaveMessage;
    
    
    //  捐款金额
    private  Integer money;
    
    
    //  捐款金额
    private  BigDecimal moneyFloat;
    
    
    //  需要发票
    private  Integer needInvoice;
    
    
    //  发票抬头
    private  String invoiceTitle;
    
    
    //  发票地址
    private  String invoiceAddress;
    
    
    //  发票联系人
    private  String invoiceContactName;
    
    
    //  发票联系电话
    private  String invoiceContactPhone;
    
    
    //  状态
    private  Integer payStatus;
    
    
    //  返回状态码
    private  String returnCode;
    
    
    //  返回信息	
    private  String returnMsg;
    
    
    //  公众账号ID	
    private  String appid;
    
    
    //  商户号	
    private  String mchId;
    
    
    //  设备号	
    private  String deviceInfo;
    
    
    //  随机字符串	
    private  String nonceStr;
    
    
    //  签名
    private  String sign;
    
    
    //  签名类型	
    private  String signType;
    
    
    //  业务结果	
    private  String resultCode;
    
    
    //  错误代码	
    private  String errCode;
    
    
    //  错误代码描述	
    private  String errCodeDes;
    
    
    //  用户标识	
    private  String openid;
    
    
    //  是否关注公众账号	
    private  String isSubscribe;
    
    
    //  交易类型	
    private  String tradeType;
    
    
    //  付款银行	
    private  String bankType;
    
    
    //  订单金额	
    private  Integer totalFee;
    
    
    //  应结订单金额	
    private  Integer settlementTotalFee;
    
    
    //  货币种类	
    private  String feeType;
    
    
    //  现金支付金额	
    private  Integer cashFee;
    
    
    //  现金支付货币类型	
    private  String cashFeeType;
    
    
    //  总代金券金额		
    private  Integer couponFee;
    
    
    //  微信支付订单号		
    private  String transactionId;
    
    
    //  商户订单号		
    private  String outTradeNo;
    
    
    //  商家数据包		
    private  String attach;
    
    
    //  支付完成时间	
    private  String timeEnd;
    
    
    //  支付备注
    private  String payNote;

    /**
     * 创建
     * @param targetSourceType  捐款目标 0 公益，1队伍，2个人
     * @param targetId  目标ID
     * @param targetName  目标名称
     * @param targetHeadImg  目标头像
     * @param fromSourceUserId  捐款来源用户ID
     * @param userId  用户ID
     * @param userRealname  真实姓名
     * @param userWxNickname  用户昵称
     * @param userWxHeadImg  用户头像
     * @param realname  留言昵称
     * @param leaveMessage  留言
     * @param money  捐款金额
     * @param moneyFloat  捐款金额
     * @param needInvoice  需要发票
     * @param invoiceTitle  发票抬头
     * @param invoiceAddress  发票地址
     * @param invoiceContactName  发票联系人
     * @param invoiceContactPhone  发票联系电话
     * @param payStatus  状态
     * @param returnCode  返回状态码
     * @param returnMsg  返回信息	
     * @param appid  公众账号ID	
     * @param mchId  商户号	
     * @param deviceInfo  设备号	
     * @param nonceStr  随机字符串	
     * @param sign  签名
     * @param signType  签名类型	
     * @param resultCode  业务结果	
     * @param errCode  错误代码	
     * @param errCodeDes  错误代码描述	
     * @param openid  用户标识	
     * @param isSubscribe  是否关注公众账号	
     * @param tradeType  交易类型	
     * @param bankType  付款银行	
     * @param totalFee  订单金额	
     * @param settlementTotalFee  应结订单金额	
     * @param feeType  货币种类	
     * @param cashFee  现金支付金额	
     * @param cashFeeType  现金支付货币类型	
     * @param couponFee  总代金券金额		
     * @param transactionId  微信支付订单号		
     * @param outTradeNo  商户订单号		
     * @param attach  商家数据包		
     * @param timeEnd  支付完成时间	
     * @param payNote  支付备注
     */
    public DonationRecordModel (Integer targetSourceType,Long targetId,String targetName,String targetHeadImg,Long fromSourceUserId,Long userId,String userRealname,String userWxNickname,String userWxHeadImg,String realname,String leaveMessage,Integer money,BigDecimal moneyFloat,Integer needInvoice,String invoiceTitle,String invoiceAddress,String invoiceContactName,String invoiceContactPhone,Integer payStatus,String returnCode,String returnMsg,String appid,String mchId,String deviceInfo,String nonceStr,String sign,String signType,String resultCode,String errCode,String errCodeDes,String openid,String isSubscribe,String tradeType,String bankType,Integer totalFee,Integer settlementTotalFee,String feeType,Integer cashFee,String cashFeeType,Integer couponFee,String transactionId,String outTradeNo,String attach,String timeEnd,String payNote) {
        this.targetSourceType=targetSourceType;
        this.targetId=targetId;
        this.targetName=targetName;
        this.targetHeadImg=targetHeadImg;
        this.fromSourceUserId=fromSourceUserId;
        this.userId=userId;
        this.userRealname=userRealname;
        this.userWxNickname=userWxNickname;
        this.userWxHeadImg=userWxHeadImg;
        this.realname=realname;
        this.leaveMessage=leaveMessage;
        this.money=money;
        this.moneyFloat=moneyFloat;
        this.needInvoice=needInvoice;
        this.invoiceTitle=invoiceTitle;
        this.invoiceAddress=invoiceAddress;
        this.invoiceContactName=invoiceContactName;
        this.invoiceContactPhone=invoiceContactPhone;
        this.payStatus=payStatus;
        this.returnCode=returnCode;
        this.returnMsg=returnMsg;
        this.appid=appid;
        this.mchId=mchId;
        this.deviceInfo=deviceInfo;
        this.nonceStr=nonceStr;
        this.sign=sign;
        this.signType=signType;
        this.resultCode=resultCode;
        this.errCode=errCode;
        this.errCodeDes=errCodeDes;
        this.openid=openid;
        this.isSubscribe=isSubscribe;
        this.tradeType=tradeType;
        this.bankType=bankType;
        this.totalFee=totalFee;
        this.settlementTotalFee=settlementTotalFee;
        this.feeType=feeType;
        this.cashFee=cashFee;
        this.cashFeeType=cashFeeType;
        this.couponFee=couponFee;
        this.transactionId=transactionId;
        this.outTradeNo=outTradeNo;
        this.attach=attach;
        this.timeEnd=timeEnd;
        this.payNote=payNote;
    }

    /**
     * 全量更新
     * @param targetSourceType  捐款目标 0 公益，1队伍，2个人
     * @param targetId  目标ID
     * @param targetName  目标名称
     * @param targetHeadImg  目标头像
     * @param fromSourceUserId  捐款来源用户ID
     * @param userId  用户ID
     * @param userRealname  真实姓名
     * @param userWxNickname  用户昵称
     * @param userWxHeadImg  用户头像
     * @param realname  留言昵称
     * @param leaveMessage  留言
     * @param money  捐款金额
     * @param moneyFloat  捐款金额
     * @param needInvoice  需要发票
     * @param invoiceTitle  发票抬头
     * @param invoiceAddress  发票地址
     * @param invoiceContactName  发票联系人
     * @param invoiceContactPhone  发票联系电话
     * @param payStatus  状态
     * @param returnCode  返回状态码
     * @param returnMsg  返回信息	
     * @param appid  公众账号ID	
     * @param mchId  商户号	
     * @param deviceInfo  设备号	
     * @param nonceStr  随机字符串	
     * @param sign  签名
     * @param signType  签名类型	
     * @param resultCode  业务结果	
     * @param errCode  错误代码	
     * @param errCodeDes  错误代码描述	
     * @param openid  用户标识	
     * @param isSubscribe  是否关注公众账号	
     * @param tradeType  交易类型	
     * @param bankType  付款银行	
     * @param totalFee  订单金额	
     * @param settlementTotalFee  应结订单金额	
     * @param feeType  货币种类	
     * @param cashFee  现金支付金额	
     * @param cashFeeType  现金支付货币类型	
     * @param couponFee  总代金券金额		
     * @param transactionId  微信支付订单号		
     * @param outTradeNo  商户订单号		
     * @param attach  商家数据包		
     * @param timeEnd  支付完成时间	
     * @param payNote  支付备注
     */
    public void update(Integer targetSourceType,Long targetId,String targetName,String targetHeadImg,Long fromSourceUserId,Long userId,String userRealname,String userWxNickname,String userWxHeadImg,String realname,String leaveMessage,Integer money,BigDecimal moneyFloat,Integer needInvoice,String invoiceTitle,String invoiceAddress,String invoiceContactName,String invoiceContactPhone,Integer payStatus,String returnCode,String returnMsg,String appid,String mchId,String deviceInfo,String nonceStr,String sign,String signType,String resultCode,String errCode,String errCodeDes,String openid,String isSubscribe,String tradeType,String bankType,Integer totalFee,Integer settlementTotalFee,String feeType,Integer cashFee,String cashFeeType,Integer couponFee,String transactionId,String outTradeNo,String attach,String timeEnd,String payNote) {
        this.targetSourceType=targetSourceType;
        this.targetId=targetId;
        this.targetName=targetName;
        this.targetHeadImg=targetHeadImg;
        this.fromSourceUserId=fromSourceUserId;
        this.userId=userId;
        this.userRealname=userRealname;
        this.userWxNickname=userWxNickname;
        this.userWxHeadImg=userWxHeadImg;
        this.realname=realname;
        this.leaveMessage=leaveMessage;
        this.money=money;
        this.moneyFloat=moneyFloat;
        this.needInvoice=needInvoice;
        this.invoiceTitle=invoiceTitle;
        this.invoiceAddress=invoiceAddress;
        this.invoiceContactName=invoiceContactName;
        this.invoiceContactPhone=invoiceContactPhone;
        this.payStatus=payStatus;
        this.returnCode=returnCode;
        this.returnMsg=returnMsg;
        this.appid=appid;
        this.mchId=mchId;
        this.deviceInfo=deviceInfo;
        this.nonceStr=nonceStr;
        this.sign=sign;
        this.signType=signType;
        this.resultCode=resultCode;
        this.errCode=errCode;
        this.errCodeDes=errCodeDes;
        this.openid=openid;
        this.isSubscribe=isSubscribe;
        this.tradeType=tradeType;
        this.bankType=bankType;
        this.totalFee=totalFee;
        this.settlementTotalFee=settlementTotalFee;
        this.feeType=feeType;
        this.cashFee=cashFee;
        this.cashFeeType=cashFeeType;
        this.couponFee=couponFee;
        this.transactionId=transactionId;
        this.outTradeNo=outTradeNo;
        this.attach=attach;
        this.timeEnd=timeEnd;
        this.payNote=payNote;
    }

}
